<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>矿井信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	$(document).ready(function() {
		$("#btnExport").click(function(){
			top.$.jBox.confirm("确认要导出用户数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/mine/mine/export");
					$("#searchForm").submit();
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		});
	});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/mine/mine/">矿井信息列表</a></li>
		<shiro:hasPermission name="mine:mine:edit"><li><a href="${ctx}/mine/mine/form">矿井信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="mine" action="${ctx}/mine/mine/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>矿井名：</label>
				<form:input path="minename" htmlEscape="false" maxlength="255" class="input-medium" autocomplete="off"/>
			</li>
			<%-- <li><label>经度：</label>
				<form:input path="longitude" htmlEscape="false" class="input-medium" autocomplete="off"/>
			</li>
			<li><label>纬度：</label>
				<form:input path="latitude" htmlEscape="false" class="input-medium" autocomplete="off"/>
			</li> --%>
			<li><label>深度(米)：</label>
				<form:input path="depth" htmlEscape="false" class="input-medium" autocomplete="off"/>
			</li>
			<li><label>直径(米)：</label>
				<form:input path="diameter" htmlEscape="false" class="input-medium" autocomplete="off"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>矿井名</th>
				<th>经度</th>
				<th>纬度</th>
				<th>井深(米)</th>
				<th>直径(米)</th>
				<!-- <th>更新时间</th> -->
				<th>备注信息</th>
				<shiro:hasPermission name="mine:mine:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="mine">
			<tr>
				<td><a href="${ctx}/mine/mine/form?id=${mine.id}">
					${mine.minename}
				</a></td>
				<td>
					${mine.longitude}
				</td>
				<td>
					${mine.latitude}
				</td>
				<td>
					${mine.depth}
				</td>
				<td>
					${mine.diameter}
				</td>
				<%-- <td>
					<fmt:formatDate value="${mine.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td> --%>
				<td>
					${mine.remarks}
				</td>
				<shiro:hasPermission name="mine:mine:edit"><td>
    				<a href="${ctx}/mine/mine/form?id=${mine.id}">修改</a>
					<a href="${ctx}/mine/mine/delete?id=${mine.id}" onclick="return confirmx('确认要删除该矿井信息吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>